/*
 * Copyright (c) 2008-2021 浩瀚深度 All Rights Reserved.
 *
 * <p>FileName: Result.java</p>
 *
 * @author zz
 * @date 2023/4/24
 * @version 1.0
 * History:
 * v1.0.0 2023/4/24 Create
 */
package com.jason.zax.base;

import lombok.Data;

import java.io.Serializable;

/**
 * <p>Title: Result</p>
 * <p>Description: </p>
 *
 * @author zz
 */
@Data
public class Result implements Serializable {

    /**
     *
     */
    private static final long serialVersionUID = 1L;

    /**
     * 状态码
     */
    private Integer code;

    /**
     * 响应消息
     */
    private String msg;

    /**
     * 响应数据
     */
    private Object data;
    private Integer count;


    public Result(ResultCode resultCode, Object data) {
        this.code = resultCode.getCode();
        this.msg = resultCode.getMsg();
        this.data = data;
    }

    public Result(Integer code, String msg, Object data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

}